home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!sschaem
- From: sschaem@teleport.com (Stephan Schaem)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Bitfieldinsert?
- Date: 22 Feb 1996 05:55:41 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Message-ID: <4gh0gt$6ll@maureen.teleport.com>
- References: <38232461@kone.fipnet.fi> <4g8gje$oov@maureen.teleport.com> <38232552@kone.fipnet.fi>
- NNTP-Posting-Host: kelly.teleport.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Jyrki Saarinen (jsaarinen@kone.fipnet.fi) wrote:
-
- : > : > REPEAT 16
- : > : > move.l (a0)+,(a1)+ ;draw 8 pixels
- : > : > ENDR
- : > : >
- : > : > a0 is a pointer in a lighting cube ... Think of it as tmapping a
- : > : > X*1 texture and having all the texture size prescaled so you only
- : > : > have intereg part when steping in the texture.
- : > : > in 8bit its the same but you map only 4 pixels at a time.
- : >
- : > : Hey, finally a place for doing some c2p pass(es) in the inner
- : > : loop..? Have you done this code, btw?
- : >
- : > Nope, I'm just thinking about it... I will probably create a dithered
-
- : Damn.. ;)
-
- Trying to find correct gouraud shading code (Wich 'nobody' seem to do)
- I saw a post saying that he can do gouraud on a PC at .25 cycle per pixel.
- So I guess this as been done already , and you can probably get the source
- code .. but then its for the x86 :)
-
- : > gouraud lighting cube, and render in 12bit (rgb buffer) and render
- : > in ham6 in 256*300 (interleaved componant).12bit dithered should look
- : > pretty good. My guess a full true color scene can be rendred and c2p at
-
- : A word chunky buffer? Explain more, please..
-
- Well, it would be a ham6 screen... the rendering is done in interleaved
- componant: line only 4bit red, line 1 only 4bit of green, line 2 4bit
- blue, line 3 4bit red etc... then this is c2p in the lower 4planne of
- a 256x300 interlaced screen (only 256x150 4bit is c2p per feild.)
- c2p a 256x150 screen 4bit take ~11ms on a 030 (cpu only).
-
- Have you seen Transgression2 on the PC? they use vertical componant
- interleave ... ok they have 64shade per componant, OCS only as 16.
- But you can get dithering for free.
-
- The c2p part is strait forward, you could use the blitter on 25mhz 030
- and under.(The upper 2 bit are preset for the interleaved componant.)
- The rendering loop of the funtions just need to get the right source
- pointer according to the line number. (texture, color cube are separate
- and dithered.)
-
- : > I use it... You dont alway have to texture, gouraud light small
- : > triangle.
-
- : Can this method be used in Gouraud, too?
-
- I think I was talking about bfset and small triangle for flat shading.
- You would need bfins on each plane to copy the gouraud data, I think
- it would be dead slow. But a solution using and/or and moves with a
- plannar version of the lighting cube would work better (Just thinking)
- basicly 'blitting' triangles, where the mask is dynamicly created.
-
- : >รก so if you have some object with small metalic surfaces you can use this
- : > methode to fill triangle, also this can be aplied on 'far away'
- : > objects.
-
- : It is just a pain in the ass to check "if a poly is small enough
- : or if a object is enough far etc." Many routines, not very
- : cache friendly.
-
- It really depand if you have an 'even' load , and its worth the time.
- Maybe in the case of 2 fighter that are alway pretty much in front so
- you wont gain from that... but a model of a city , you have 'alway'
- something far enought to have the cmp/Bcc worth doing.
-
- : > but 32x16 poly are actually 'huge in lores.
-
- : A good point. But no good for a game for example.
-
- Why not? flat shading is not accepted anymore? You can alway use
- a 'chunky' background and render flat shaded object with sprites
- over that ?
-
- Stephan
-
-